home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Dialog2 / c / OpenPos < prev    next >
Text File  |  1995-05-19  |  1KB  |  41 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Dialog2.OpenPos.c
  12.     Author:  Copyright © 1994 Julian Smith
  13.     Version: 1.03 (13 Mar 1995)
  14.     Purpose: Dialogue box handling
  15. */
  16.  
  17.  
  18. #include "DeskLib:Window.h"
  19. #include "DeskLib:WimpSWIs.h"
  20. #include "DeskLib:Dialog2.h"
  21.  
  22.  
  23. void    Dialog2_Window_GetWindowOpenPos( 
  24.         wimp_point *pos, window_openpos openpos, window_handle window
  25.         )
  26.     /* This is a bit of a cheat - opens the window using Window_Show, looks at where    */
  27.     /* the window opened, closes the window, and returns the position.            */
  28. {
  29. window_state    state;
  30.  
  31. Window_Show( window, openpos);
  32. Wimp_GetWindowState( window, &state);
  33. Wimp_CloseWindow( window);
  34.  
  35. pos->x = state.openblock.screenrect.min.x;
  36. pos->y = state.openblock.screenrect.max.y;
  37.  
  38. return;
  39. }
  40.  
  41.